using TMPro;
using UnityEngine;
using UnityEngine.UI;

public class CityBuildingCollectTooltip : MonoBehaviour
{
	public TextMeshProUGUI Text;

	public Image Icon;

	public void Setup(Sprite sprite)
	{
		Icon.sprite = sprite;
	}

	public void SetMoney(int amount)
	{
		Text.text = amount.ToString();
		base.gameObject.SetActive(amount > 0);
	}

	public void OnClicked()
	{
		GetComponentInParent<CityBuildingElementHandler>().DoCollect();
	}
}
